import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'


const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function(location) {
  return originalPush.call(this, location).catch(err => {})
};
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'/register-index'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
        {
     path:'/home/poputer',
     name:'Poputer',
    component: () => import(/* webpackChunkName: "poputer" */ '../views/Poputer.vue'),
    mete:{
      shouTab:true
    }
     },{
       path:'/home/center',
       name:'Center',
    component: () => import(/* webpackChunkName: "poputer" */ '../views/Center.vue'),
     },
     {
      // 消息中西详情
     path:'/home/mesdetails',
      component: () => import(/* webpackChunkName: "poputer" */ '../views/MesDetails.vue'),
     },
     //快递单评价
     {
       path:'/home/EoEvaluation',
      component: () => import(/* webpackChunkName: "poputer" */ '../views/EoEvaluation.vue'),
     },
    //  客户列表
     {
      path:'/home/cust',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/Cust.vue'),
     } ,
    //  拜访记录
     {
      path:'/home/seelist',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/Seelist.vue'),
    },{
      path:'/home/particulars',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/Particulars.vue'),
    },{
      path:'/home/Newadd',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/NewAdd.vue'),
    },
    {
      path:'/home/Newsee',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/Newsee.vue'),
    },
    {
      path:'/home/seedetails',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/SeeDetails.vue'),
    },{
      path:'/home/SelectKehu',
      component: () => import(/* webpackChunkName: "YiComment" */ '../views/SelectKehu.vue'),

    }
    ]
  },
  // 客户详细信息
  {
    path:'/Information',
    component: () => import(/* webpackChunkName: "YiComment" */ '../views/Information.vue'),

  },{
    path:'/Redact',
    component: () => import(/* webpackChunkName: "YiComment" */ '../views/Redact.vue'),

  },
  {
    path:'/customer',
    component: () => import(/* webpackChunkName: "about" */ '../views/customer.vue'),
    
  },

  {
    path:'/register',
    component: () => import(/* webpackChunkName: "about" */ '../views/register.vue')
  },
  {
    path:'/register-index',
    component: () => import(/* webpackChunkName: "about" */ '../views/login.vue'),
   
  },
  {
     path:'/personcentre',
    component: () => import(/* webpackChunkName: "about" */ '../views/Personcentre.vue'),
     children:[
       {
         path:'/personcentre/info',
         component: () => import(/* webpackChunkName: "about" */ '../views/Info.vue'),
       },
       {
         path:'/personcentre/Versions',
         component: () => import(/* webpackChunkName: "about" */ '../views/Versions.vue'),
       }
     ]
  },
  //评价
  {
    path:'/appraiseClick',
    name:'AppraiseClick',
    component: () => import(/* webpackChunkName: "appraiseClick" */ '../views/AppraiseClick.vue')
  },
  //送货单查看评价
  {
    path:'/yiComment',
    name:'YiComment',
    component: () => import(/* webpackChunkName: "YiComment" */ '../views/YiComment.vue')
  },
  // 物流单评价
  {
    path:'/eoappraiseClick',
    name:'EOAppraiseClick',
    component: () => import(/* webpackChunkName: "YiComment" */ '../views/EOAppraiseClick.vue')
  },
  // 物流单查看评价
  {
    path:'/eoyiComment',
    name:'EOYiComment',
    component: () => import(/* webpackChunkName: "YiComment" */ '../views/EOYiComment.vue')
  }
  //  客户列表
  

]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
